load("//bzl:cpp_library.bzl", "cpp_library")

package(default_visibility = ["//visibility:public"])

cpp_library(
    name = "blocking_queue",
    hdrs = ["BlockingQueue.h"],
    deps = [
        "//folly:c_portability",
        "//folly:optional",
        "@glog",
    ],
)

cpp_library(
    name = "lifo_sem_mpmc_queue",
    hdrs = ["LifoSemMPMCQueue.h"],
    deps = [
        ":blocking_queue",
        "//folly:mpmc_queue",
        "//folly/synchronization:lifo_sem",
    ],
)

cpp_library(
    name = "priority_lifo_sem_mpmc_queue",
    hdrs = ["PriorityLifoSemMPMCQueue.h"],
    deps = [
        ":blocking_queue",
        "//folly:executor",
        "//folly:mpmc_queue",
        "//folly:range",
        "//folly/synchronization:lifo_sem",
        "@glog",
    ],
)

cpp_library(
    name = "priority_unbounded_blocking_queue",
    hdrs = ["PriorityUnboundedBlockingQueue.h"],
    deps = [
        ":blocking_queue",
        "//folly:constexpr_math",
        "//folly:executor",
        "//folly/concurrency:priority_unbounded_queue_set",
        "//folly/lang:exception",
        "//folly/synchronization:lifo_sem",
    ],
)

cpp_library(
    name = "unbounded_blocking_queue",
    hdrs = ["UnboundedBlockingQueue.h"],
    deps = [
        ":blocking_queue",
        "//folly/concurrency:unbounded_queue",
        "//folly/synchronization:lifo_sem",
    ],
)
